package cn.com.dcsgo.constant;

import lombok.Getter;

/**
 * 业务异常枚举类
 *
 * @author Dcsgo
 * @since 2025/9/16 09:10
 */
@Getter
public enum BusinessEnum {
    UN_AUTHORIZATION(401, "未授权"),
    OPERATION_FAIL(-1, "操作失败"),
    PARAMS_ERROR_FAIL(-1, "参数验证失败"),
    ACCESS_DENY_FAIL(-1, "权限不足，请联系管理员"),
    SERVER_INNER_ERROR(-1, "服务器开小差了");

    private final Integer code;
    private final String desc;

    BusinessEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
